use std::hash::{Hash, Hasher};

#[derive(Debug, Clone, Default)]
pub struct AssetInfo {
    pub start: u16,
    pub end: u16,
    pub content_type: String,
    pub content_id: String,
    pub content_disposition: String,
    pub content_encoding: String,
    pub file_location: Option<String>,
}

impl Eq for AssetInfo {}

impl Hash for AssetInfo {
    fn hash<H: Hasher>(&self, hasher: &mut H) {
        self.content_id.hash(hasher);
    }
}

impl PartialEq for AssetInfo {
    fn eq(&self, other: &Self) -> bool {
        self.content_id == other.content_id
    }
}
